<!-- content -->
<div class="span9 well">
    <section id="home">
        <div class="page-header">
            <h3>Pengajuan Judul Tesis</h3>
        </div>
        <?php
        if ($stat == NULL) {
            $sts->status = 'Revision';
        } else {
            $sts = $stat;
        }
        if ($sts->status == 'Revision') {
            echo form_open('mahasiswa/judul', 'class="bs-docs-example form-horizontal"');
            echo'<div class = "control-group">
            <label class = "control-label">Judul tesis 1</label>
            <div class = "controls">
            <input type = "text" name = "judul1" placeholder = "Judul 1" required>
            </div>
            </div>
            <div class = "control-group">
            <label class = "control-label">Judul tesis 2</label>
            <div class = "controls">
            <input type = "text" name = "judul2" placeholder = "Judul 2" required>
            </div>
            </div>
            <div class = "control-group">
            <label class = "control-label">Subjek</label>
            <div class = "controls">
            <input type = "text" name = "subyek" placeholder = "Subjek yang di ambil" required>
            </div>
            </div>
            <div class = "control-group">
            <label class = "control-label">Keyword</label>
            <div class = "controls">
            <textarea rows = "6" name = "keyword" placeholder = "Tuliskan keyword untuk tesis anda" required></textarea>
            </div>
            </div>
            <div class = "control-group">
            <div class = "controls">
            <label class = "checkbox">
            <input type = "checkbox" name = "aggre" value = "Y" required> Saya setuju untuk mengajukan judul tersebut di atas
            </label>
            <button type = "submit" class = "btn">Daftar</button>
            </div>
            </div>';
            echo form_close();
        }
        ?>

    </section>
    <table class="table table-bordered table-striped">
        <thead align="center">
            <tr>
                <th colspan="6" style="text-align: center; background-color:#610E54; color:white;">INFORMASI TESIS MAHASISWA</th>
            </tr>
            <tr>
                <th>NO</th>
                <th>TANGGAL</th>
                <th>JUDUL 1</th>
                <th>JUDUL 2</th>
                <th>STATUS</th>
                <th>SARAN</th>
            </tr>
        </thead>
        <tbody>
            <?php
            $no = 1;
            foreach ($judul as $data):
                ?>
                <tr>
                    <td><?php echo $no ?></td>
                    <td class="span2"><?php $db = $data->submit;$y = substr($db, 0,4);$m = substr($db,5,2);$d = substr($db, 8,2);echo $d.'-'.$m.'-'.$y; ?></td>
                    <td><?php echo $data->judul_1 ?></td>
                    <td><?php echo $data->judul_2 ?></td>
                    <td><span class="label label-warning"><?php echo $data->status ?></span></td>
                    <td class="span2"><?php
            $sts = $data->status;
            if ($sts == 'Revision') {
                echo anchor('mahasiswa/saran/' . $data->id, '<button class="btn btn-mini" type="button">Lihat Saran</button>');
            }
                ?></td>
                </tr>
                <?php
                $no++;
            endforeach;
            ?>
        </tbody>
    </table>
</div>
</div>